-
Notifications
You must be signed in to change notification settings - Fork 8
Bump Rails to 7.2 #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
paranoicsan
wants to merge
9
commits into
ruby-3-upgrade
Choose a base branch
from
rails-7.2
base: ruby-3-upgrade
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Bump Rails to 7.2 #278
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
795352d to
028786e
Compare
Changes made: - Changed spec/dummy/.ruby-version to match the required Ruby version - Updated spec/dummy/config/application.rb for Rails 7.2 compatibility - Adjusted spec/dummy/config/environments/test.rb for improved test configuration - Added spec/dummy/lib/custom_deprecation_handler.rb for custom deprecation handling - Modified spec/support/database_cleaner.rb to support a new gem version Updated gems: - acts-as-taggable-on (~> 12.0) (was ~> 9.0) - devise (~> 4.9) (was ~> 4.7) - rails (~> 7.1.5) (was ~> 7.0) - ransack (~> 4.2.1) (was ~> 2.3) - database_cleaner-active_record (~> 2.2) (was ~> 1.8) - factory_bot (~> 6.5) (was ~> 5) - rspec-rails (~> 7.1) (was ~> 4.0.2)
Bellow is a code snippet: ```log DEPRECATION WARNING: Lcms::Engine::Resource model aliases `resource_reading_assignments`, but `resource_reading_assignments` is not an attribute. Starting in Rails 7.2, alias_attribute with non-attribute targets will raise. Use `alias_method :reading_assignments, :resource_reading_assignments` or define the method manually. (called from block (3 levels) in <top (required)> at /app/spec/controllers/units_controller_spec.rb:15) ```
Bellow is a code snippet: ```log DEPRECATION WARNING: Passing the coder as positional argument is deprecated and will be removed in Rails 7.2. ```
Changes made: - Switched to Rails 7.2.2.1 and updated related dependencies in gemspec and Gemfile.lock - Added explicit rack (< 3.2) dependency for compatibility with Rails 7.2 - Updated sprockets-rails to '~> 3.5', rack-mini-profiler to '~> 4.0.1' - Added debug gem for development and test environments - Updated .rubocop.yml to exclude new dummy config/migrate/bin files and adjust Style/SymbolArray - Added/updated test/dummy files: cable.yml, storage.yml, permissions_policy.rb, public assets, and ActiveStorage migrations - Added bin/rubocop to dummy app - Updated Docker Compose config - Refactored and updated app/models/lcms/engine/document.rb, lib/lcms/engine/engine.rb, and spec/services/document_build_service_spec.rb for compatibility and improvements - Updated test environment configs for Rails 7.2 Explicitly changed gems in gemspec: - rails (~> 7.2.2, >= 7.2.2.1) - rack (< 3.2) - sprockets-rails (~> 3.5, >= 3.5.2) - rack-mini-profiler (~> 4.0.1) - debug (development)
Bellow is a code snippet: ```log DEPRECATION WARNING: Defining enums with keyword arguments is deprecated and will be removed in Rails 8.0. ```
566d3aa to
88e6628
Compare
Expand Ruby version support to 3.5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a major update to the project, primarily upgrading Rails and Ruby versions, updating several gem dependencies, and making necessary compatibility adjustments throughout the codebase. It also includes improvements to model definitions, configuration files, and adds new configuration and migration files for Rails 7+ features. Below are the most important changes grouped by theme:
Framework and Dependency Upgrades
acts-as-taggable-on,devise,rack-mini-profiler,ransack,sprockets-rails, and others in both runtime and development groups. [1] [2] [3] [4] [5]rackdependency with version constraint to satisfy Rails 7.2.2.1 requirements..ruby-versionto 3.3.9 for local development consistency.Codebase Modernization and Model Improvements
enumusage in models to the new Rails 7 syntax (e.g.,enum :role, { ... }), and replacedalias_attributewithaliaswhere appropriate for better clarity and compatibility. [1] [2] [3] [4] [5] [6] [7] [8]Documentmodel to use the newcoder:keyword argument.Configuration and Environment Updates
cable.ymlandstorage.yml. [1] [2] [3]service_namecolumn to support Rails 7+ file storage.Testing and Linting Adjustments
.rubocop.ymlto exclude new paths and files, and configured style rules to avoid false positives on symbol arrays in gemspec and Gemfile. [1] [2]Other Improvements
sprockets/railtiein the engine to ensure asset pipeline compatibility with Rails 7.byebugtodebuggem for modern debugging support in development and test environments.These changes collectively modernize the codebase for Rails 7.2, improve maintainability, and ensure compatibility with updated dependencies.